﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SendAndRecieveGroupMsg.aspx.cs" Inherits="server_SendAndRecieveGroupMsg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>fdsaf</title>

    <script type="text/javascript" src="/javascript/jquery-1.3.2.min.js"></script>

    <script src="tiny_mce/tiny_mce_src.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        tinyMCE.init({
            mode: "exact",
            elements: "msgContent",
            editor_selector: "mceEditor",
            theme: "advanced",
            plugins: "safari,pagebreak,style,advhr,advimage,advlink,iespell,insertdatetime,preview,searchreplace,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,inlinepopups",
            // Theme options
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,link,unlink,anchor,cleanup,|,syntaxhl,preview",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            theme_advanced_buttons4: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            theme_advanced_resizing: true,
            remove_linebreaks: false,
            extended_valid_elements: "textarea[cols|rows|disabled|name|readonly|class]",
            content_css: "tiny_mce/themes/simple/skins/o2k7/content.css",
            language: "zh"
        });
    </script>

    <script type="text/javascript" src="/javascript/common.js"></script>

    <script language="javascript" type="text/javascript">

        var receiveGroupId = '<%=receiveGroupId %>';
        var sendRUId = '<%=sendRUId %>';
        var RUGroupRemarkName = '<%=RUGroupRemarkName %>';
        
       /*$(document).keydown(function(event) {
            tinyMCE.triggerSave(true, true);
            var msgContent = $('#msgContent').val();
            ctrlEnterInGroup(event, receiveGroupId, sendRUId, msgContent,RUGroupRemarkName);
        });*/

        $(document).ready(function() {

        receiveGroupMsg('<%=receiveGroupId %>', '<%=sendRUId %>');

            $('#btnSendgroupMsg').click(function() {
                tinyMCE.triggerSave(true, true);
                var msgContent = $('#groupmsgContent').val();

                
                sendGroupMsg( receiveGroupId,msgContent,sendRUId, RUGroupRemarkName);
                tinyMCE.getInstanceById("groupmsgContent").setContent("");
            });
        });

    </script>

    <style type="text/css">
        #Button1
        {
            text-align: right;
        }
        .style1
        {
            width: 100%;
        }
        .style4
        {
            width: 550px;
        }
        .style5
        {
            color: #FF0000;
        }
        #divgroupMsgContent li
        {
            list-style:none;
            font-size:15px;
        }
        
         #groupMem li
        {
            list-style:none;
            font-size:12px;
        }
        #btnSendgroupMsg
        {
            height: 26px;
             font-size:15px;
        }
        #groupMem
        {
            width: 210px;
            height: 275px;
            margin-left: 0px;
        }
        .style6
        {
            width: 288px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table class="style1">
        <tr>
            <td>
                <div style="overflow: scroll; height: 300px;width:460px">
                <ul id="divgroupMsgContent"></ul>
                
                </div>
                
            </td>
            <td class="style6">
            <div  style="overflow: scroll; height: 290px; width :150px;">
                    <asp:Literal ID="Literal1" runat="server" ></asp:Literal>
                </div>
            </td>
        </tr>
        <tr>
            <td class="style4" colspan="2">
                &nbsp;<textarea name="groupmsgContent" id="groupmsgContent" style="height: 80px; width: 132%;" cols="20"
                    rows="1"></textarea></td>
        </tr>
        <tr>
            <td class="style4">
                <input id="btnSendgroupMsg" type="button"  value="发送" />
            <span class="style5">可使用Ctrl + Enter组合键发送</span></td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
